package com.liezh.state;

/**
 * @author liezh
 * @date 2021-10-29
 */
public class DeliveringState implements PackageState {
    //Singleton
    private static DeliveringState instance = new DeliveringState();
    private DeliveringState() {
    }
    public static DeliveringState instance() {
        return instance;
    }
    //Business logic
    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("4 - Package is Delivering !!");
        ctx.setCurrentState(WaitForPickUpState.instance());
    }
}
